package zhishuang.wang.sansi.playlist.entry;

/**
 * @Author Zhishuang.Wang
 * @Date 2023/7/5 11:10
 * @Email 1406110602@qq.com
 */

import zhishuang.wang.sansi.tools.ReturnData;

public class VideoBase {
    private Integer audit;
    private Integer zoom;
    private Integer volume;
    private Integer videoType;
    private String videoPath;
    private PlayArea playArea;

    public VideoBase() {
    }

    public VideoBase(int videoType, String videoPath) {
        this.videoType = videoType;
        this.videoPath = videoPath;
    }

    public ReturnData checkParam() {
        ReturnData rd = new ReturnData();
        rd.setCode(1);
        String errorMes = "";
        if (this.videoType != null && this.videoPath != null) {
            if (this.videoType < 0 || this.videoType > 1) {
                errorMes = errorMes + "视频类型取值范围：0或1；";
            }
        } else {
            errorMes = errorMes + "视频类型、视频路径、播放时间等参数必填；";
        }

        if (errorMes != null && errorMes.length() != 0) {
            rd.setMessage(errorMes);
        } else {
            rd.setCode(0);
        }

        return rd;
    }

    public Integer getAudit() {
        return this.audit;
    }

    public void setAudit(Integer audit) {
        this.audit = audit;
    }

    public Integer getVolume() {
        return this.volume;
    }

    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    public Integer getVideoType() {
        return this.videoType;
    }

    public void setVideoType(Integer videoType) {
        this.videoType = videoType;
    }

    public String getVideoPath() {
        return this.videoPath;
    }

    public void setVideoPath(String videoPath) {
        this.videoPath = videoPath;
    }

    public Integer getZoom() {
        return this.zoom;
    }

    public void setZoom(Integer zoom) {
        this.zoom = zoom;
    }

    public PlayArea getPlayArea() {
        return this.playArea;
    }

    public void setPlayArea(PlayArea playArea) {
        this.playArea = playArea;
    }
}
